import request from '@/utils/request'

// 查询发票抬头列表
export function listHeader(query) {
  return request({
    url: '/consumer/header/list',
    method: 'get',
    params: query
  })
}

// 查询发票抬头详细
export function getHeader(invoiceId) {
  return request({
    url: '/consumer/header/' + invoiceId,
    method: 'get'
  })
}

// 新增发票抬头
export function addHeader(data) {
  return request({
    url: '/consumer/header',
    method: 'post',
    data: data
  })
}

// 修改发票抬头
export function updateHeader(data) {
  return request({
    url: '/consumer/header',
    method: 'put',
    data: data
  })
}

// 删除发票抬头
export function delHeader(invoiceId) {
  return request({
    url: '/consumer/header/' + invoiceId,
    method: 'delete'
  })
}
